<?php echo $this->paginaTitulo( $this->subtitle ); ?>
<?php echo $this->render('sitios/_opcion_agregar.phtml'); ?>

<?php $url_base = $this->baseUrl . '/admin/sitios';?>

<table>
  <tr>
    <th><a href="<?php echo $this->baseUrl; ?>/admin/sitios/index/orden/id/asc/<?php echo !$this->orden_asc;?>">Id</a></th>
    <th><a href="<?php echo $this->baseUrl; ?>/admin/sitios/index/orden/nombre/asc/<?php echo !$this->orden_asc;?>">Nombre</a></th>
    <th><a href="<?php echo $this->baseUrl; ?>/admin/sitios/index/orden/titulo/asc/<?php echo !$this->orden_asc;?>">Título</a></th>
    <th><a href="<?php echo $this->baseUrl; ?>/admin/sitios/index/orden/descripcion/asc/<?php echo !$this->orden_asc;?>">Descripción</a></th>
    <th><a title="Orden" href="<?php echo $this->baseUrl; ?>/admin/sitios/index/orden/orden/asc/<?php echo !$this->orden_asc;?>">Ord</a></th>
    <th><a href="<?php echo $this->baseUrl; ?>/admin/sitios/index/orden/fecha_creacion/asc/<?php echo !$this->orden_asc;?>">Creación</a></th>
    <th><a title="Por Defecto" href="<?php echo $this->baseUrl; ?>/admin/sitios/index/orden/por_defecto/asc/<?php echo !$this->orden_asc;?>">Def</a></th>
    <th colspan="3">Acciones</th>
  </tr>

<?php foreach( $this->sitios as $sitio): ?>
	<tr>
    	<td><?php echo $sitio->id;?></td>
    	<td><?php echo $sitio->nombre;?></td>
    	<td><?php echo $sitio->titulo;?></td>
    	<td><?php echo $sitio->descripcion; ?></td>
    	<td><?php echo $sitio->orden; ?></td>
    	<td><?php echo $this->dateFormat( $sitio->fecha_creacion );?></td>
    	<td>
    		<?php if($sitio->por_defecto): ?>
    			<img border="0"	src="<?php echo $this->baseUrl ?>/html/images/estado_<?php echo $sitio->por_defecto;?>.png"/>
			<?php else: ?>
				&nbsp;
    		<?php endif; ?>
    	</td>

    	<td nowrap="nowrap">
    		<div class="menu-admin">
    			<?php echo $this->htmlLink($url_base.'/ver/id/'.$sitio->id, "Ver");?>
    			<?php echo $this->htmlLink($url_base.'/modificar/id/'.$sitio->id, "Mod");?>
    			<?php echo $this->htmlLink($url_base.'/eliminar/id/'.$sitio->id, "Eli");?>
			</div>
    	</td>
  	</tr>
<?php endforeach; ?>

</table>
<?php echo $this->render('sitios/_opcion_agregar.phtml'); ?>